package com.mini.demos.webgame.codec;

import com.mini.framework.communicate.mina.protocol.CodeFactory;
import com.mini.framework.communicate.mina.protocol.Decoder;
import com.mini.framework.communicate.mina.protocol.Encoder;

public class GameCodecFactory implements CodeFactory {

	public Decoder[] getDecoder() {
		Decoder[] decoders = new Decoder[]{
			new RegDecoder(),
			new LoginDecoder(),
			new JobDecoder(),
			new JobListDecoder()
		};
		return decoders;
	}

	public Encoder[] getEncoder() {
		Encoder[] encoders = new Encoder[]{
			new RegEncoder(),
			new RegRespEncoder(),
			new LoginEncoder(),
			new LoginRespEncoder(),
			new JobEncoder(),
			new JobRespEncoder(),
			new JobListRespEncoder()
		};
		return encoders;
	}

}
